#include <head.h>

int main(int argc, char const *argv[])
{
    // 开启写段
    int fifo_fd = open("fifo_2" , O_WRONLY );
    if(fifo_fd == -1)
    {
        ERRLOG("打开失败");
        return 0;
    }

    char buf[1024];

    while (1)
    {
        memset(buf , 0 , sizeof(buf));
        printf("写入:");
        scanf("%s" , buf);

        write(fifo_fd , buf , strlen(buf));
        
    }
    
    
    return 0;
}